package se.webbzon.oschi01.worldcamera;

import java.awt.Color;
import java.awt.Font;
import java.awt.Graphics;
import java.awt.Image;
import java.awt.geom.AffineTransform;
import java.awt.image.ImageObserver;

import se.webbzon.oschi01.font.HorizontalAlignment;
import se.webbzon.oschi01.font.VerticalAlignment;
import se.webbzon.oschi01.textureset.Texture3D;

public interface WorldCameraDrawable {

	/** Clears the current content of this drawable instance. **/
	public abstract void clear();

	/** Paints the drawable content onto a graphics instance at the
	 * given position. */
	public abstract void paint(int x, int y, Graphics g, ImageObserver observer);

	/** Resets the transform of this drawable instance to the 
	 * identity transform. This method is faster than calling 
	 * setTransform(AffineTransform) with the identity transform. **/
	public abstract void resetTransform();

	/** Sets the transform of this drawable instance for the subsequent
	 * drawing methods. **/
	public abstract void setTransform(AffineTransform transform);

	/** Copies the current transform of this drawable instance to the
	 * provided AffineTransform. **/
	public abstract void getTransform(AffineTransform transform);

	/** Sets the brush color used for subsequent drawing methods. **/
	public abstract void setColor(Color c);

	/** Returns the brush color used for subsequent drawing methods. **/
	public abstract Color getColor();

	/** Sets the background color used for subsequent drawing methods. **/
	public abstract void setBackgroundColor(Color c);

	/** Returns the background color used for subsequent drawing methods. **/
	public abstract Color getBackgroundColor();

	/** Sets the font used for subsequent drawing methods. **/
	public abstract void setFont(Font f);

	/** Returns the font used for subsequent drawing methods. **/
	public abstract Font getFont();

	/** Sets the transparency value for subsequent drawing methods.
	 * If the transparency is zero then nothing is shown at all. **/
	public abstract void setTransparency(float transparency);

	/** Returns the transparency value for subsequent drawing methods. **/
	public abstract float getTransparency();

	/** Draws the outline of a rectangle at position (x,y) with a 
	 * given width and height. **/
	public abstract void drawRect(int x, int y, int width, int height);

	/** Draws a filled rectangle at position (x,y) with a given
	 * width and height. **/
	public abstract void fillRect(int x, int y, int width, int height);

	/** Draws the outline of an oval at position (x,y) with a 
	 * given width and height. **/
	public abstract void drawOval(int x, int y, int width, int height);

	/** Draws a filled oval at position (x,y) with a given
	 * width and height. **/
	public abstract void fillOval(int x, int y, int width, int height);

	/** Draws a line between the point (x1,y1) and (x2,y2). **/
	public abstract void drawLine(int x1, int y1, int x2, int y2);

	/** Draws an image at the position (x,y). **/
	public abstract void drawImage(Image image, int x, int y);

	/** Draws an image at the position (x,y) with a given
	 * width and height. **/
	public abstract void drawImage(Image image, int x, int y, int width, int height);

	/** Draws a 3d-texture at the position (x,y). **/
	public abstract void drawTexture(Texture3D texture, int x, int y);

	/** Draws an 3d-texture at the position (x,y) with a given
	 * width and height. **/
	public abstract void drawTexture(Texture3D texture, int x, int y, int width, int height);

	/** Draws the given string at the position (x,y). **/
	public abstract void drawString(String str, int x, int y);

	/** Sets the horizontal alignment of the font when using drawString(). **/
	public abstract void setHAlignment(HorizontalAlignment alignment);

	/** Sets the vertical alignment of the font when using drawString(). **/
	public abstract void setVAlignment(VerticalAlignment alignment);

	/** Returns the horizontal alignment of the font when using drawString(). **/
	public abstract HorizontalAlignment getHAlignment();

	/** Returns the vertical alignment of the font when using drawString(). **/
	public abstract VerticalAlignment getVAlignment();

	/** Removes the drawn content outside the provided clip boundary. **/
	public abstract void clip(int x, int y, int width, int height);

}